home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 September (IDG) / Sep99.iso / MarkzScout™ 14-day trial / Scripts / All Colors.M1S next >
Encoding:
Text File  |  1999-02-04  |  1.5 KB  |  57 lines  |  [TEXT/MSCT]

  1. //
  2. // All Colors.M1S: show color list for document
  3. //
  4. //
  5. // *************************************
  6. // Procedures
  7. // *************************************
  8. //
  9. proc colorProc
  10.   print
  11.     Left(
  12.       it.color_type
  13.       +"                ",16)+
  14.     Left(
  15.       it.color_model
  16.       +"                ",16)
  17.     + it.name
  18. endproc
  19.  
  20. //
  21. // **************************************
  22. // The actual script
  23. // **************************************
  24. //
  25. // Save 'it' in 'theJob' - 'it' is under control of MarkzONE and
  26. // changes value quite often
  27. //
  28. theJob = it
  29. //
  30. // Gimme a title
  31. //
  32. print "Complete Color List For " + theJob.name
  33. print "Color Type      Color Model     Color Name"
  34. print "----------      -----------     ----------"
  35.  
  36. //
  37. // Gimme a color list: execute 'colorProc' (see above) for each of the colors
  38. // encountered during scan. Scan will start from 'theJob' and then
  39. // descend through the job's treestructure of objects - anything that is 
  40. // either used, contained in, overlapping with, or defined by - so it will 
  41. // find all colors used by boxes, all colors used by contained images, 
  42. // all colors defined by the document,... and so on...
  43. //
  44. on color do colorProc
  45. scan theJob links uses,contains,overlaps,defines
  46. //
  47. // 'scan reset' clears the 'on color' - it is a good idea to 
  48. // do scan reset as soon as possible to avoid unexpected results
  49. // because of an 'on' statement that is still in effect.
  50. scan reset
  51.  
  52. //
  53. // Gimme a line
  54. //
  55. print "---------------------------------------"
  56.  
  57.